;---------
; Man's House
;
SCENE 10 ulamo,	SCENE, "House in Manze", 0, 0
	THEME	0
	MUSIC	ulamo.mid
	POSE	11,4
	SEL		1
	IF T84, @end
	IF T60, @gardengnome2
	ACTOR	1,	"Ecstatic Man", ronnie,	9,	25,	90
	IF T52, @gardengnome
	IF T50, @gabonasia2
	IF T45, @gabonasia
	IF T43+I602,@sitae
	IF T42, @hmm
	IF T40, @sitae
	IF T32, @lucky
	IF T30, @erson
	
	
	LOCK 1
	COMPARE #<num.peopleInScene>, "1"
	IF>,@MOB
	' You are he, are you not?
	H: Am I who?
	1: You are the hero they speak of...
	H: Who speaks of?
	1: Never mind that for now, Hero.
	1: I see you already have the first crystal...
	GIVE G5000
	1: Visit Erson, for there you will find the next crystal.
	H: Thank you. But, why are you helping me? I don't even know...
	1: It matters not. Visit Erson. There you will find it.
	1: You will need very durable boots to get there.
	1: Take mine.
	GIVE I600
	GIVE T30
	H: Thank you, but...
	MOVE	1,	-10,-10,	1
	H: Huh...where'd he go?
	LOCK 0
END

@eventactorclick1
	' Hmm...
	SOUND consider1.wav
END

@erson
	MOVE	1,-10,-10,1
	N: Go to Erson. It is there.
END

@lucky
	1: You have found the second crystal...you truly are the Hero.
	1: This is good news indeed.
	H: You've been most kind, but I still don't know your name...
	1: My name is not important.
	1: What is important is that you can find the next shard in Sitae.
	H: Please, tell me who you are!
	1: My name is...
	1: Umalo.
	ACTOR	1,	"Ulamo", ronnie,	9,	25,	90
	1: Off to Sitae!
	H: But, how will I--
	MOVE 1,-10,-10,1
	H: --get there...
	H: He did it again. This is very nerve-racking.
	GIVE T40
	GIVE T43
	GIVE I602
	GOTO SCENE 203
END

@sitae
	MOVE 1,-10,-10,1
	N: Sitae...go to Sitae...
END

@wait
	MOVE 1,-10,-10,1
	N: Please wait for your leader.
END

@mob
	' One at a time, people, one at a time.
END

@gabonasia
	ACTOR	1,	"Ulamo", ronnie,	9,	25,	90
	' I see you got another shard...
	' Well, then, I have another task.
	' Omega is on the other side of the Gabonasian mountains.
	' Go and find out what he's up to.
	H: But where--
	MOVE 1,-10,-10,1
	H: --is the path?
	H: Oh well.. there are some mountains in sowthwest Pillow Gauntlet; those must be it.
	GIVE T50
END

@gobonasia2
	MOVE 1,-10,-10
	N: To the mountains you go.
END

@gardengnome
	ACTOR	1,	"Ulamo", ronnie,	9,	25,	90
	1: I will help you no more.
	1: Speak with King Axl if you must.
	GIVE T60
	H: Why won't you--
	WAIT 1
	MOVE 1,-100,-100,1
	H: --help me? Oh well. I'll go talk with Axl, I guess.
	GIVE T60
END

@gardengnome2
	N: To Axl you go.
END

@end
	H: It's vacant.
END

;---------
;Erson's Gate
;
SCENE 15 gates,	SCENE,	"Erson's Gates", 0,0
	THEME 0
	MUSIC battledark.mid
	ACTOR	1,	"Freaky Man", farmer,	9,	25,	90
	POSE	11,4
	SEL	1
	GIVE H10000
	GIVE M10000
	IF T31, @leave

	' You there! Why are you here?
	SOUND sitae1.wav
	H: I seek a crystal!
	' Don't go any further! The undead rule here!
	' AHH! RUN!
	MUSIC fight2.mid
	MOVE 1, 90, 90
	FIGHT2 300, 300, 300
	IF LOSE, @dead
	IF WIN, @win
END

@dead
	MOVE 1, 89, 90
	' I warned you!
	H: Oh, shut up!
	' I'll ressurect you...
	GIVE L1
	GIVE H10000
	GIVE M10000
	' Now, get out of here!
	WAIT 1
	GOTO LINK 0,1,0
END
	
@win
	MOVE 1, 25, 90
	' I can't believe it! You won! Maybe there is hope, after all!
	WAIT 10
	' Alright, you go on, just be careful!
	' Here, take this stick! One of the clones had it!
	GIVE I451
	GIVE T1103
	' If you ever need any healing, come back here.
	' Bye!
	Wait 0.5
	GIVE T31
	GOTO LINK 6,0,0
END

@leave
	' There you're healed!
	GIVE L1
	GIVE H10000
	GIVE M10000
	' Be careful!
	WAIT 1
	GOTO LINK 6,0,0
END

;-------
; Beggar
;
SCENE 16 gate,	 SCENE, "Beggar", 0, 0
	THEME	0
	MUSIC #nochange
	ACTOR	1,	"Beggar", beggar,	9,	25,	90
	POSE	11,4
	SEL		1
	COMPARE #<num.peopleInScene>, "1"
	IF>,@MOB
	IF T404, @empty
	IF T1058, @yousuck
	IF T403, @ansojsojsoj
	IF T402, @yessoj
	IF T401, @nosojyet
	IF T400, @bought

	' Sow plz!
	SOUND sowplz.wav
	H: You there! Who are you?
	' You giev sow?
	' I found theese ub3r 1337 boots!
	' Whenever I wear them, I walk real fast!
	H: That's great, I guess...
	' But I need G more!
	' I'd be willing to sell them for 25,000 gold.
	H: What? That's crazy!
	' PLZ!
	ASK 20
	IF YES, @yes
	H: AHH! RUN AWAY!
	' You know you be back!
END

@eventactorclick1
	' Sow plz!
	SOUND sowplz.wav
	' You giev SOJ?
	SOUND soj.wav
	' An SOJ!
	SOUND soj2.wav
END

@alreadyhavethem
	' You have these,now wait for your leader!
END

@yes
	H: Fine, I'll buy them...
	H: *grumble* Crazy old coot.
	' YAY!
	IF G25000, @buyboots1
	' HEY YOU NO HAVE MONEY!
END

@buyboots1
	IF PARTY T400, @alreadyhavethem
	' Thank u!
	TAKE G25000
	GIVE I601
	GIVE T400
END

@bought
	' You giev SOJ?
	SOUND soj.wav
	H: Ugg.. NOW WHAT?
	' I've also got this stick...
	IF T1050, @omglol
	H: What use would I get out of that?
	' Umm...
	' Uhh...
	GOTO @sojsojsoj
END

@sojsojsoj
	' You giev SOJ?
	SOUND soj.wav
	WAIT 1
	GOTO @sojsojsoj
END

@omglol
	H: Hmm, that could be useful...
	H: I'll see if I can find...
	H: What is it again?
	' An SOJ.
	SOUND SOJ2.wav
	H: Right, well, here I go!
	GIVE T401
END

@nosojyet
	' Me want SOJ now!
	H: Now, just calm...
	WAIT 0.5
	GOTO @sojsojsoj

@yessoj
	' Me want SOJ now!
	H: Now just calm...
	WAIT 0.5
	' You giev SOJ?
	SOUND soj.wav
	' *gasp* An SOJ!
	' You giev?
	ASK 20
	IF YES, @yesyessoj
	GOTO @sojsojsoj
END

@yesyessoj
	H: Yes, sure, why not.
	H: Now, hand me the stick...
	' What?
	' You said you geiv it!
	H: But you said you'd give me a stick for it!
	' No!
	H: Yes!
	' ... fine.
	' Lemme get it...
	' Ok!
	' Ready?
	' Set?
	' TRADE!
	TAKE I510
	GIVE I453
	GIVE T403
	GIVE T1007
	' YAY! SOJ!
	H: That's great... I'll be leaving now...
	GOTO @ansojsojsoj
END

@ansojsojsoj
	' An SOJ!
	SOUND SOJ2.wav
	WAIT 1
	GOTO @ansojsojsoj
END

@yousuck
	' An SOJ!
	SOUND SOJ2.wav
	H: Hey, this isn't a wand! You little...
	'  HAHAHA!
	' I trick u!
	' I leave now!
	' Goo-bye!
	MOVE 1,-20,90
	H: Hey, wait you little...
	H: Ugg...
	H: NOW what?
	WAIT 2
	GIVE T404
	N: HAHA! You don't know what to do!
	WAIT 3
	N: Scat! Go find out what to do!
END

@empty
	MOVE 1,-20,-20,1
END

@mob
	POSE 3
	' NO! TOO MANY PEOPLE!
END
;-------
; Wrong Delta!
;
SCENE 18 delta,	 SCENE, "Delta", 0, 0
	THEME	0
	MUSIC   #nochange
	ACTOR	1,	"Delta", Wandshop,	1,25,90
	IF T32, @clear
	IF XP, @lose

	' Well, it looks like you made it...
	WAIT 5
	' but you didn't!
END

@eventactorclck1
	' AHA!
	SOUND lose2.wav
END

@lose
	' AHA!
	SOUND LOSE2.wav
	' See ya!
	WAIT 0.5
	GOTO LINK 6,2,0
END

@clear
	MOVE 1,-100,-100,1
END

;-------
; Delta Begining
;
SCENE 19 gate,	 SCENE, "Gate", 0, 0
	THEME 0
	MUSIC #nochange
	ACTOR 1,  "Gatekeeper", farmer, 1,25,90
	IF T32, @winner

	' You there...
	SOUND sitae1.wav
	' Are you ready to go down?
	ASK 99999
	IF YES, @yes
	' Ok, come back when you are!
END

@winner
	' You have slain Delta! Great job!
	' Do you want to go back down? (YES/NO)
	ASK 9999
	IF YES, @yes2
	' Ok, good luck!
END

@eventactorclick1
	' Yay! I have been clicked by a hero!
END

@yes
	' Alright, be careful!
	' I'll start the timer!
	' You don't have much time! Hurry!
	WAIT 2
	GIVE L1
	GIVE H10000
	GIVE M10000
	COUNTDOWN 150
	GOTO LINK 8,12,0
END

@yes2
	' Ok! Here you go..
	WAIT 1
	GIVE L9999
	GIVE M9999
	GOTO LINK 8,12,0
END

;-------
; Ticket Man
;
SCENE 20 gate,	 SCENE, "Ticket Man", 0, 0
	THEME 0
	MUSIC wandshop.mid
	ACTOR 1,  "Ticket Man", darkwanderer, 1,25,90
	COMPARE #<num.peopleInScene>, "1"
	IF>,@MOB
	IF -I218, @giveticket
	IF I215+I216-T5-T6, @takeitaway
	GOTO @opening
END

@eventactorclick1
	' Tickets, tickets, tickets!
	SOUND ticket1.wav
END

@giveticket
	' Tickets, tickets, tickets!
	SOUND ticket1.wav
	' Welcome to the ticket shop!
	' Here you will find many tickets to everywhere you want to go!
	' All of these tickets come with a lifetime warranty, meaning that they will never be used up!
	' So we may get acquainted, I'll give you this ticket to here for free!
	GIVE I218
	GOTO @opening
END

@opening
	' Welcome! It looks like you could use some tickets!
	SOUND ticket1.wav
	IF -I219, @ticket0
	IF T1-I215, @ticket1
	IF T31-I216, @ticket2
	IF T41-I217, @ticket3
	IF T52-I223, @ticket4
	IF T60-I221, @ticket5
	IF T72-I222, @ticket6
	' Looks like I'm out of tickets for now!
	' Come back later!
	WAIT 1
	N: Simmen: Meaning after a few quests
END

@ticket0
	' I have a ticket to the PK arena for sale!
	' It's 1 simple payment of 1000 gold!
	' Want to buy it? (YES/NO)
	ASK 20
	IF YES+G1000, @yesticket0
	' When you want it or have enough money, come by!
	' Try this?
	IF T1-I215, @ticket1
	' Oh, looks like you can't! Do more quests, then come back!
END

@ticket1
	' I have a ticket to Axl's Castle right here!
	' All it costs is 2000 gold!
	' Want it? (YES/NO)
	ASK 20
	IF YES+G2000, @yesticket1
	' When you want it or have enough money, come by!
	' Try this?
	IF T31-I216, @ticket2
	' Oh, looks like you can't! Do more quests, then come back!
END

@ticket2
	' I have a ticket to Erson for sale!
	' It can be yours, for just 15 thousand gold!
	' Want it? (YES/NO)
	ASK 20
	IF YES+G15000, @yesticket2
	' When you want it or have enough money, come by!
	' Try this?
	IF T41-I217, @ticket3
	' Oh, looks like you can't! Do more quests, then come back!
END

@ticket3
	' I have a ticket to the wonderful city of Sitae right here!
	' Only 50 thousand gold!
	ASK 20
	IF YES+G50000, @yesticket3
	' When you want it or have enough money, come by!
	' Try this?
	IF T52-I223, @ticket4
	' Oh, it looks like you can't! Do more quests, then come back!
END

@ticket4
	' I have a ticket to the Mountain Top!
	' A small fee of 100 thousand gold will do just fine!
	' Want it? (YES/NO)
	ASK 9999
	IF YES+G100000, @yesticket4
	' When you want it or have enough money, come by!
	' Try this?
	IF T60-I221, @ticket5
	' Oh, looks like you can't! Do more quests, then come back!
END

@ticket5
	' I bet you'd like to go to the plantation more often.
	' Now you can! For a fee of 150 thousand gold, though.
	' Want it? (YES/NO)
	ASK 9999
	IF YES+G150000, @yesticket5
	' When you want it or have enough money, come by!
	' Try this?
	IF T72-I222, @ticket6
	' Oh, looks like you can't! Do more quests, then come back!
END

@ticket6
	' It's a hassle to get to the secret area.
	' With my ticket, it's easy! Just 250 thousand gold!
	' Want it? (YES/NO)
	ASK 9999
	IF YES+G250000, @yesticket6
	' When you want it or have enough money, come by!
END

@yesticket0
	' Here you go!
	TAKE G1000
	GIVE I219
	GIVE T1100
	' Please return for all your ticket needs!
	GOTO @opening
END

@yesticket1
	' Here you go!
	TAKE G2000
	GIVE I215
	GIVE T1101
	' Please return for all your ticket needs!
	GOTO @opening
END

@yesticket2
	' Here you go!
	TAKE G15000
	GIVE I216
	GIVE T1102
	' Please return for all your ticket needs!
	GOTO @opening
END

@yesticket3
	' Here you go!
	TAKE G50000
	GIVE I217
	GIVE T1103
	' Please return for all your ticket needs!
	GOTO @opening
END

@yesticket4
	' Here you go!
	TAKE G100000
	GIVE I223
	GIVE T1104
	' Please return for all your ticket needs!
	GOTO @opening
END

@yesticket5
	' Here you go!
	TAKE G150000
	GIVE I221
	GIVE T1105
	' Please return for all your ticket needs!
	GOTO @opening
END

@yesticket6
	' Here you go!
	TAKE G250000
	GIVE I222
	GIVE T1106
	' Please return for all your ticket needs!
	GOTO @opening
END

@mob
	' Sorry, I have to sell to one person at a time.
	' Come back when you're alone.
END

;-------
; Delta
;
SCENE 21 delta2,	 SCENE, "Delta", 0, 0
	THEME	0
	MUSIC   #nochange
	ACTOR	1,	"Delta", Wandshop,	1,25,90
	IF T32, @end
	IF XP, @lose

	' Well, it looks like you made it...
	WAIT 5
	COUNTDOWN 0
	' Welcome, %1, I know why you came here, and there can be no way for me to let you pass...
	' Just as I destroyed Erson, I'll destroy you!
	' It's too bad, really!
	' That's one hero less in the world!
	' I will NOT fail master Omega!
	MOVE 1,-20,90,1
	MUSIC Delta.mid
	FIGHT2 207
	IF WIN, @win
	IF LOSE, @lose
END

@win
	' How... could... this... be...
	' I can't fail master Omega!
	' NOOOOOOOOOOOO!!!!!!!
	WAIT 2
	N: Now, return to the man in Manze!
	WAIT 1.5
	GIVE T32
	GIVE I501
	GOTO SCENE 102
END

@end
	MOVE 1,-100,-100,1
END

@lose
	' AHA!
	SOUND LOSE2.wav
	' See ya!
	WAIT 0.5
	GOTO LINK 6,2,0
END

;-------
; Shop
;
SCENE 31 gate,	 SCENE, "Duladin's Shop", 0, 0
	THEME	0
	MUSIC   #nochange
	ACTOR	1,	"Duladin", ronnie,	1,25,90
	1: Welcome to my shop! I am Duladin!
@normal 
1: Get anything you want!
COMPARE #<num.hostLevel>, 94
IF> @sellequipfix
	SET lowLevel, #<num.hostLevel>
	SUB lowLevel, "5"
	SET highLevel, #<num.hostLevel>
    ADD highLevel, "5"
@sellequip2
; now sell the stuff
	OFFER2 #<lowLevel>,#<highLevel>, 12, #<lowLevel>,#<highLevel>, 10, #<lowLevel>,#<highLevel>, 11, #<lowLevel>,#<highLevel>, 14, #<lowLevel>,#<highLevel>, 15, #<lowLevel>,#<highLevel>, 20,	#<lowLevel>,#<highLevel>, 21,	#<lowLevel>,#<highLevel>, 22,	#<lowLevel>,#<highLevel>, 23
END

@sellequipfix
SET lowLevel, 90
SET highLevel, 99
GOTO @sellequip2

@eventactorclick1
	IF -T602, @end
	IF T603, @end
	1: Ahh... another one...
	1: I'm your last clue; good luck after this.
	GIVE T603
	1: "All tremble at the sound of his name... ____."
END

@end
END
	